package org.adream.account.model;

public class ResultModel<T> {
	
	public final static String SUCCESS = "0000", SUCCESS_MSG = "操作成功",
			ERR_PARAM = "1001",ERR_PARAM_MSG="参数错误",
			ERR_PERMISSION = "1002",ERR_PERMISSION_MSG="权限错误", 
			ERR_SHORT_OP_TIME = "1003",ERR_SHORT_OP_TIME_MSG="操作时间过短",
			ERR_USER_INFO = "1004",ERR_USER_INFO_MSG="用户信息错误", 
			NOT_FOUND_OBJECT = "2001",NOT_FOUND_OBJECT_MSG="对象不存在",
			HAS_FOUND_OBJECT = "2002",HAS_FOUND_OBJECT_MSG="对象已存在",
			WARN_CHECKCODE = "3001",WARN_CHECKCODE_MSG="验证码有误",
			WARN_DATA_LENGTH = "3002",WARN_DATA_LENGTH_MSG="数据长度太长",
			WARN_PHONE = "3003",WARN_PHONE_MSG="手机号码无效",
			WARN_EMAIL = "3004",WARN_EMAIL_MSG="邮箱地址无效",
			WARN_PHONE_EMAIL = "3005",WARN_PHONE_EMAIL_MSG="手机号&邮箱地址无效",
			ERR_DATABASE = "4001",ERR_DATABASE_MSG="数据库操作错误",
			ERR_SYS = "9001",ERR_SYS_MSG="系统性错误",
			ERR_SERVICE = "5000"; //这个不用了， sercice层错误用ERR_SYS
	
	private String returnCode;
	private String returnMessage;
	private T returnObject;

	public ResultModel(String returnCode, String returnMessage, T returnObject) {
		this.returnCode = returnCode;
		this.returnMessage = returnMessage;
		this.returnObject = returnObject;
	}

	public String getReturnCode() {
		return returnCode;
	}

	public void setReturnCode(String returnCode) {
		this.returnCode = returnCode;
	}

	public String getReturnMessage() {
		return returnMessage;
	}

	public void setReturnMessage(String returnMessage) {
		this.returnMessage = returnMessage;
	}

	public T getReturnObject() {
		return returnObject;
	}

	public void setReturnObject(T returnObject) {
		this.returnObject = returnObject;
	}
}
